package com.guyu.common.core.exception.code;

import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * 公共错误码
 */
@Getter
@AllArgsConstructor
public enum ErrorCodeEnum implements IErrorCode {

    //成功
    SUCCESS(0, "Success"),

    //特殊错误码
    HINT(10086, "弹框提示"),
    HINT_JUMP(10087, "弹框提示跳转"),
    BUSINESS_FAILURE(10000, "业务处理失败"),

    //通用错误
    SYSTEM_ERROR(1000, "系统繁忙"),
    UNKNOWN_ERROR(1001, "未知错误"),
    SERVER_UNAVAILABLE(1002, "服务不可用"),
    BAD_REQUEST(1003, "错误的请求"),
    CALL_LIMITED(1004, "调用频次超限"),
    REQUEST_TIMEOUT(1005, "请求超时"),
    METHOD_NOT_ALLOWED(1006, "方法不被允许"),
    UNSUPPORTED_MEDIA_TYPE(1007, "不支持的媒体类型"),

    ILLEGAL_ARGUMENT(1010, "缺少参数或参数取值不合法"),
    PARAMETER_RISKY(1011, "参数内容违规"),

    DATA_ALREADY_EXISTS(1020, "有重复记录存在"),
    DATA_NOT_EXIST(1021, "数据不存在"),

    ;

    private final Integer code;
    private final String msg;

    @Override
    public String getBizCode() {
        return "";
    }

}
